unit JATUIF_Driver_Debug;

{$mode objfpc}{$H+}

interface

uses
    Classes, SysUtils;

Procedure dbg(Component:String; Message:String);

implementation

const
     dbg_enabled = false;
     dbg_file = 'JATUIF.dbg';

Procedure dbg(Component:String; Message:String);
Var
   Output:TStringlist;

Begin
     If dbg_enabled then begin
        Output:= TStringList.Create;
        If FileExists(dbg_file) then Output.LoadFromFile(dbg_file);
        Output.Add('['+Component+'] '+Message);
        Output.SaveToFile(dbg_file);
        Output.Free;
     end;
end;

end.

